<!DOCTYPE html>
<html lang="ch" xmlns="http://www.w3.org/1999/html">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>管理员登陆页面</title>

<!-- Bootstrap -->
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">

<!-- Google Font -->
<link href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700" rel="stylesheet">

<!-- Template style -->
<link rel="stylesheet" href="dist/css/style.css">
<link rel="stylesheet" href="pages/et-line-font/et-line-font.css">
<link rel="stylesheet" href="pages/font-awesome/css/font-awesome.min.css">
<link type="text/css" rel="stylesheet" href="dist/weather/weather-icons.min.css">
<link type="text/css" rel="stylesheet" href="dist/weather/weather-icons-wind.min.css">

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>

<body class="body-bg-color">
<div class="wrapper">
  <div class="form-body">
    <form action="adminLogin" class="col-form" method="post" id="form" >
    <div class="col-logo"><a href="login.html"><img alt="" src="dist/img/logo-lg.png"></a></div>
      <header>管理员登录</header>
      <fieldset>
        <section>
          <div class="form-group has-feedback">
            <label class="control-label">管理员账号</label>
            <input class="form-control" placeholder="请输入账号" type="text" name="adminAccount" id="adminAccount">
            <span class="fa fa-user form-control-feedback" aria-hidden="true"></span> </div>
        </section>
        <section>
          <div class="form-group has-feedback">
            <label class="control-label">管理员密码</label>
            <input class="form-control" placeholder="请输入密码" type="password" name="adminPassword" id="adminPassword">
            <span class="fa fa-lock form-control-feedback" aria-hidden="true"></span> </div>
        </section>
        <section>
          <div class="row">
            <div class="col-md-6 checkbox"> <a href="forgotPassword.html" class="modal-opener">密码忘记了？</a> </div>
            <div class="col-md-6 text-right">
              <label class="checkbox">
                <input name="remember" checked="" type="checkbox">
                <i></i>记住我</label>
            </div>
          </div>
        </section>
      </fieldset>
      <footer class="text-right">
        <button type="button" class="btn btn-info pull-right"  id="submit">登录</button>
        <a href="register.html" class="button button-secondary">注册</a> </footer>
    </form>
  </div>
</div>
<!-- wrapper --> 

<!-- jQuery --> 
<script src="dist/js/jquery.min.js"></script>
<script src="bootstrap/js/bootstrap.min.js"></script>
<script src="dist/js/ovio.js"></script>
<script src="dist/layer/layer.js"></script>
  <script type="text/javascript">
    $("#submit").click(function () {
        //获取 填入的账号和密码
        var adminAcc = $("#adminAccount").val();
        var adminPas = $("#adminPassword").val();
        // 用jq发送post请求
        // $.post(url,data,callback,type)   后三个参数可选
        $.post("adminLogin",{"adminAccount":adminAcc,"adminPassword":adminPas},function (resultEntity) {
            if (resultEntity.resultFlag==true) {
                // 重定向
                window.location.replace("index.html");
            }else{
                layer.msg("登陆失败");
            }
        });
    });
  </script>
</body>
</html>